from openpyxl import Workbook
from datetime import datetime
from openpyxl.reader.excel import load_workbook

# # 创建一个工作簿对象
# wb = Workbook()
# # 获取活动工作表对象
# ws = wb.active
#
# # # 数据可以直接分配到单元格
# # ws['A1'] = 42
# # # 行也可以追加
# # ws.append([1, 2, 3])
# # # Python类型将自动转换
# # ws['A2'] = datetime.now()
# # # 保存文件
# # wb.save("data/sample.xlsx")
# wb.create_sheet('表2')
# wb.save("data/sample2.xlsx")
wb = load_workbook("data/sample.xlsx")
# wb['']